package com.item.util;

import java.util.HashMap;
import java.util.Map;

public class SubjectUtils {
	
	public static Map<String,Integer> subjectMap = new HashMap<String, Integer>();
	{
		subjectMap.put("英语一", 1);
		subjectMap.put("英语二", 1);
		subjectMap.put("英语三", 1);
		subjectMap.put("英语", 1);
		subjectMap.put("政治", 2);
		subjectMap.put("数学一", 3);
		subjectMap.put("数学二", 3);
		subjectMap.put("数学", 3);
	}
	
	public static int getTyepBySubject(String subject){
		Integer type = subjectMap.get(subject);
		if(type == null){
			type = 0;
		}
		return type;
	}
	
	public static String getSubjectByType(int type){
		String subject = "";
		switch(type){
		case 1:
			subject = "英语";
			break;
		case 2:
			subject = "政治";
			break;
		case 3:
			subject = "数学";
			break;
		case 4:
			subject = "专业课";
			break;
		case 5:
			subject = "专业课";
			break;
		default:
			subject = "无";
		}
		return subject;
	}

}
